import request from "@/utils/request";

// 查询字段映射列表
export function listField(query) {
  return request({
    url: "/system/workflow/form/fieldListApi",
    method: "get",
    params: query,
  });
}

// 查询字段映射列表
// export function listAllCategory(query) {
//   return request({
//     url: "/system/workflow/category/listAll",
//     method: "get",
//     params: query,
//   });
// }

// 查询字段映射详细
export function getField(formId) {
  return request({
    url: "/system/workflow/form/" + formId,
    method: "get",
  });
}

// 新增字段映射
export function addField(data) {
  return request({
    url: "/system/workflow/form/insertFieldApi",
    method: "post",
    data: data,
  });
}

// 修改字段映射
export function updateField(data) {
  return request({
    url: "/system/workflow/form",
    method: "put",
    data: data,
  });
}

// 删除字段映射
export function delField(fieldId) {
  return request({
    url: "/system/workflow/form/field/" + fieldId,
    method: "delete",
  });
}
